package pro.uccs.entity;

import java.io.Serializable;

public class SyncMessage<T> implements Serializable {
    private static final long serialVersionUID = -4407612810716113954L;
    private int msgType = 0;
    private int syncType;
    private String bizTypeCode;
    private String eventCode;
    private long sendTime;
    private T data;

    public SyncMessage(T data, String bizTypeCode, String eventCode, int syncType) {
        this.data = data;
        this.sendTime = System.currentTimeMillis() / 1000L;
        this.syncType = syncType;
        this.bizTypeCode = bizTypeCode;
        this.eventCode = eventCode;
    }

    public int getMsgType() {
        return this.msgType;
    }

    public void setMsgType(int msgType) {
        this.msgType = msgType;
    }

    public int getSyncType() {
        return this.syncType;
    }

    public void setSyncType(int syncType) {
        this.syncType = syncType;
    }

    public String getBizTypeCode() {
        return this.bizTypeCode;
    }

    public void setBizTypeCode(String bizTypeCode) {
        this.bizTypeCode = bizTypeCode;
    }

    public String getEventCode() {
        return this.eventCode;
    }

    public void setEventCode(String eventCode) {
        this.eventCode = eventCode;
    }

    public long getSendTime() {
        return this.sendTime;
    }

    public void setSendTime(long sendTime) {
        this.sendTime = sendTime;
    }

    public T getData() {
        return this.data;
    }
}